<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:95:"/data/www/html/web2017/public_html/../application/index/view/usercenter/inside_letter_list.html";i:1497950114;}*/ ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>站内信</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <!--<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">-->
    <link rel="stylesheet" href="__STATIC__/style/weui.min.css">
    <link rel="stylesheet" href="__STATIC__/style/cmgd.css">
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="/static/admin/js/layer/layer.js"></script>
    <script src="/static/admin/js/laypage/laypage.js"></script>
    <script src="/static/admin/js/laytpl/laytpl.js"></script>

    <!--奥森图标-->
    <link rel="stylesheet" href="__STATIC__/style/FontAwesome_4.2.0/css/font-awesome.min.css">
    <style>
        .weui-media-box__title{color: #000;}
        .weui-media-box__desc{color: #000; }
        .text{padding-left:9px; }
        .fa-list-ul{padding-right:3px;}
        .weui-media-box__desc img{width:16px;height:16px;margin-bottom:-3px;}
        .weui-navbar{top:5px;}
        .weui-navbar+.weui-tab__panel{
            padding-top: 62px;
            padding-bottom: 60px;
        }
        .weui-grid__icon {width:95%; }
        .imgs{float:left;width: 33%;}
        .content{font-size:14px;}
        .desc{text-align:left; padding: 10px 15px 0 20px;font-size:13px; }
        .name{color:#2fab87;font-size:13px;}
        .addTime{color:#999;}
        .button-sp-area{padding: 0 0 5px 0;}
        .fa-meh-o{fonti-size:30px;color: #ccc;}
        .weui-textarea{text-align:left;}
        .blue{color:blue;}
        .weui-grid:after{border:0px;}
        .weui-grid:before{border:0px;}
        .weui-grid{padding:3px 0px;}
        .weui-grids{padding:8px 8px;}
    </style>
</head>
<body>

<div class="container" id="container">

    <div class="page home js_show">

        <div class="page__bd" style="height: 100%;">
            <div class="weui-tab" id="navbar">


                <div class="weui-navbar">
                    <div class="weui-navbar__item" style="font-size:16px;color:#000;text-align:center;height:32px;"><b>站内信</b></div>
                </div>

                <div class="weui-tab__panel" style=" background:#fff;">
                    <div class="weui-panel__bd">
                    <script id="list-template" type="text/html">
                        {{# for(var i=0;i<d.length;i++){  }}
                            <a href="/index/usercenter/inside_letter_detail/id/{{d[i].id}}.html" class="weui-media-box weui-media-box_appmsg">
                                <div class="weui-media-box__hd">
                                    <img class="weui-media-box__thumb" src="" alt="" style="border-radius:50%; ">
                                </div>
                                <div class="weui-media-box__bd">
                                   <div style="height:18px;">
                                       <div style="width: 75%;float: left;font-size: 13px;">{{d[i].name}}</div>
                                       <div style="width: 25%;float: left;font-size: 12px;">2017-06-09</div>
                                   </div>
                                    <div style="width:100%;text-align: left;overflow: hidden;height: 20px;">{{d[i].title}}</div>
                                </div>
                            </a>

                        {{# } }}

                    </script>
                </div>
                    <div id="list-content"></div>
                </div>
            </div>

        </div>
    </div>


</div>
</body>

<script type="text/javascript">

    var ccc = 1;
    Ajaxpage();
    $(window).scroll(
            function() {
                var scrollTop = $(this).scrollTop();
                var scrollHeight = $(document).height();
                var windowHeight = $(this).height();
                if (scrollTop + windowHeight == scrollHeight) {
                    console.log(3);
                    Ajaxpage();
                }
            });

    function Ajaxpage(){
        $.post('<?php echo url("usercenter/inside_letter_list"); ?>', {page:ccc}, function(data){

            //  $(".spiner-example").css('display','none'); //数据加载完关闭动画
            console.log(data);

            if(data==''){
                // $("#list-content").html('<td colspan="20" style="padding-top:10px;padding-bottom:10px;font-size:16px;text-align:center">暂无数据</td>');
            }else{
                var tpl = document.getElementById('list-template').innerHTML;
                laytpl(tpl).render(data, function(html){
                    // document.getElementById('list-content').innerHTML = html;
                    $('#list-content').append(html);
                    $('.weui-grid__icon').css('height',$('.weui-grid__icon').css('width'));
                    ccc++;
                });
            }
        });

    }







</script>

</html>